/**
 * CoffeeMilk (C) 2010 Amen Hamdan
 * 
 * See the NOTICE file distributed with this work for additional 
 * information regarding copyright ownership.  This file is licenses
 * to you under the Apache License, Version 2.0 (the "License"); you 
 * may not use this file except in compliance with the License.  You 
 * may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 * implied. See the License for the specific language governing 
 * permissions and limitations under the License.    
 * 
 */
package ameen.rtm.coffeemilk.setup;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.JEditorPane;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import javax.swing.border.BevelBorder;
import javax.swing.border.TitledBorder;
import java.awt.Color;
import javax.swing.JTextArea;
import java.awt.Toolkit;

public class SetupWizardFrame extends JFrame {

	private static final long serialVersionUID = 1L;
	private JPanel jContentPane = null;
	private JPanel jPanel1 = null;
	private JButton backButton = null;
	private JButton nextButton = null;
	private JButton cancelButton = null;
	private JLabel jLabel = null;
	private JPanel jPanel = null;
	private JPanel jPanel2 = null;
	private JLabel headingLabel = null;
	private JPanel urlPanelInfo = null;
	private JLabel urlLabel = null;
	private JButton copyClipboardButton = null;
	private JTextArea descriptionTextArea = null;

	public JLabel getUrlLabel() {
		return urlLabel;
	}

	public JPanel getjContentPane() {
		return jContentPane;
	}

	public JLabel getHeadingLabel() {
		return headingLabel;
	}

	/**
	 * This is the default constructor
	 */
	public SetupWizardFrame() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(500, 300);
		this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/ameen/rtm/coffeemilk/ui/coffeemilk.png")));
		this.setContentPane(getJContentPane());
		this.setTitle("Setup Wizard");
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			BorderLayout borderLayout = new BorderLayout();
			borderLayout.setHgap(0);
			borderLayout.setVgap(0);
			jContentPane = new JPanel();
			jContentPane.setLayout(borderLayout);
			jContentPane.add(getJPanel1(), BorderLayout.SOUTH);
			jContentPane.add(getJPanel(), BorderLayout.CENTER);
			jContentPane.add(getJPanel2(), BorderLayout.NORTH);
		}
		return jContentPane;
	}

	/**
	 * This method initializes jPanel1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jLabel = new JLabel();
			jLabel.setText("      ");
			FlowLayout flowLayout = new FlowLayout();
			flowLayout.setAlignment(FlowLayout.RIGHT);
			jPanel1 = new JPanel();
			jPanel1.setLayout(flowLayout);
			jPanel1.add(getBackButton(), null);
			jPanel1.add(getNextButton(), null);
			jPanel1.add(jLabel, null);
			jPanel1.add(getCancelButton(), null);
		}
		return jPanel1;
	}

	/**
	 * This method initializes backButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getBackButton() {
		if (backButton == null) {
			backButton = new JButton();
			backButton.setText("Back");
		}
		return backButton;
	}

	/**
	 * This method initializes nextButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getNextButton() {
		if (nextButton == null) {
			nextButton = new JButton();
			nextButton.setText("Next");
		}
		return nextButton;
	}

	/**
	 * This method initializes cancelButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getCancelButton() {
		if (cancelButton == null) {
			cancelButton = new JButton();
			cancelButton.setText("Cancel");
		}
		return cancelButton;
	}

	/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			jPanel = new JPanel();
			jPanel.setBorder(BorderFactory.createEmptyBorder(5, 6, 5, 6));
			jPanel.setLayout(new BorderLayout());
			jPanel.add(getUrlPanelInfo(), BorderLayout.SOUTH);
			jPanel.add(getDescriptionTextArea(), BorderLayout.CENTER);
		}
		return jPanel;
	}

	/**
	 * This method initializes jPanel2	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			GridLayout gridLayout1 = new GridLayout();
			gridLayout1.setRows(1);
			headingLabel = new JLabel();
			headingLabel.setText("JLabel");
			headingLabel.setFont(new Font("Dialog", Font.BOLD, 18));
			jPanel2 = new JPanel();
			jPanel2.setBorder(BorderFactory.createEmptyBorder(10, 5, 25, 5));
			jPanel2.setLayout(gridLayout1);
			jPanel2.add(headingLabel, null);
		}
		return jPanel2;
	}

	/**
	 * This method initializes urlPanelInfo	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	public JPanel getUrlPanelInfo() {
		if (urlPanelInfo == null) {
			urlLabel = new JLabel();
			urlLabel.setText("JLabel");
			urlPanelInfo = new JPanel();
			urlPanelInfo.setLayout(new BorderLayout());
			urlPanelInfo.setBorder(BorderFactory.createTitledBorder(null, "", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
			urlPanelInfo.add(urlLabel, BorderLayout.CENTER);
			urlPanelInfo.add(getCopyClipboardButton(), BorderLayout.EAST);
		}
		return urlPanelInfo;
	}

	/**
	 * This method initializes copyClipboardButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getCopyClipboardButton() {
		if (copyClipboardButton == null) {
			copyClipboardButton = new JButton();
			copyClipboardButton.setFont(new Font("Dialog", Font.PLAIN, 8));
			copyClipboardButton.setText("Copy to Clipboard");
		}
		return copyClipboardButton;
	}

	/**
	 * This method initializes descriptionTextArea	
	 * 	
	 * @return javax.swing.JTextArea	
	 */
	public JTextArea getDescriptionTextArea() {
		if (descriptionTextArea == null) {
			descriptionTextArea = new JTextArea();
			descriptionTextArea.setFont(new Font("Dialog", Font.PLAIN, 12));
			descriptionTextArea.setBackground(new Color(238, 238, 238));
			descriptionTextArea.setWrapStyleWord(true);
			descriptionTextArea.setLineWrap(true);
		}
		return descriptionTextArea;
	}

}
